home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 113 / gfatip12 / gfatip12.doc < prev    next >
Text File  |  1987-11-11  |  6KB  |  130 lines

  1.  
  2.  
  3.                                               November 11, 1987
  4.  
  5.  
  6.                              GFATIP12.DOC
  7.  
  8.                            by John B. Holder
  9.                        Senior Software Engineer
  10.                         Marathon Computer Press
  11.               Asst. Sysop on GEnie's MichTron Roundtable
  12.  
  13.  
  14.           This is the 12th in a planned series of GFA Tip files.  
  15.      The topic of this issue is creating Quick Draw Text Windows 
  16.      in GFA Basic.  In this archive you will find the following 
  17.      files:
  18.  
  19.                              GFATIP12.BAS
  20.                               WINDOW.BAS
  21.                              GFATIP12.PRG
  22.                              GFATIP12.DOC
  23.  
  24.      
  25.                               Background
  26.       
  27.          This GFATIP file is intended to show you that you can 
  28.      create Fast Redraw GEM(tm) windows and how to do it.  It is a 
  29.      fairly complex subject, so if you are a beginner just bear 
  30.      with the concepts in this doc file & refer to the source code 
  31.      to gain an understanding of what is happening. 
  32.                              
  33.                              Why do this?
  34.      
  35.           GEM(tm) is well known and loved for it's ease of use 
  36.      with it's unique user interface, however it isn't the best 
  37.      graphics text handler in the world.  Obviously there are a 
  38.      few software developers out there that agree with this 
  39.      concept too.  That's why we have seen programs like TEMPUS 
  40.      emerge.  This specialized type of Window Redrawing employed 
  41.      by programs of this class are not relying on GEM(tm) to 
  42.      accomplish the placement of Graphics Text within a window.  
  43.      They are using their own video writing routines to conduct 
  44.      smooth, flicker free text scrolling.  After you have had a 
  45.      chance to view the files in this GFATIP ARChive, you'll note 
  46.      the difference in scrolling and redraw times.
  47.      
  48.                        What must we do?         
  49.       
  50.          First off we will set up a few screen buffers, and then 
  51.      we can use Xbios 5 to conduct some fancy dancy frame 
  52.      flipping.  Please refer to the source code to discover where 
  53.      and how these buffers are set up.
  54.      
  55.      
  56.                            Why is it faster?
  57.      
  58.           The presented method of window redrawing is faster 
  59.      because we are writing to our offscreen video page in 
  60.      straight text mode & not GEM(tm) graphics text mode.  You can 
  61.      realize a savings of up to 50% or more.  From that point all 
  62.      we have to do is Grab the appropriate screen area with GET, 
  63.      flip back to the physical screen ram area and PUT the text 
  64.      into our GEM(tm) window.  Pretty easy huh?  Now, I'll bet 
  65.      you're thinking, "Why didn't I think of that?".
  66.  
  67.      
  68.                 What can I display in the Text Window?
  69.       
  70.          You can display any ASCII text file you care to load 
  71.      into the window.  For that matter, why not run the GFATIP12 
  72.      compiled program and load in this .DOC file?  By doing so, 
  73.      you'll get a quick appreciation for just what is happening.
  74.  
  75.      
  76.                     Why is the WINDOW.BAS file included?
  77.       
  78.          I included that file for two reasons.  First, it is the 
  79.      beginning file I used for the creation of this TIP file.  It 
  80.      will demonstrate more of the GEM Window functions that are 
  81.      possible than GFATIP12.BAS will, & it's a good comparison 
  82.      program for you to see the difference made with the Quick 
  83.      Draw Windows.
  84.  
  85.                            Closing Comments
  86.      
  87.           You are provided with a running turnkey text display 
  88.      windowing program + the source code so that you can begin to 
  89.      create professional quality scrolling text windows in your 
  90.      own programs.  Since this is a fairly complex subject, you 
  91.      are left to studying the source code in the provided files to 
  92.      learn the techniques on your own.  You may want to pick up a 
  93.      good GEM(tm) reference to fully grasp the undertakings of the 
  94.      program.  I would recommend 2 books at this stage.  They are:
  95.                   
  96.                   ATARI ST GEM Programmer's Reference
  97.                                    &
  98.                           ATARI ST Internals
  99.  
  100.           Both of the above books are published by ABACUS software 
  101.      & can be purchased either directly or through your local 
  102.      software store (if any).
  103.      
  104.           I'm sure that some of you will experience difficulty in 
  105.      understanding the concepts presented in this TIP file.  
  106.      Please be forewarned that when experimenting with variations 
  107.      of this program you'll most likely crash your system, or 
  108.      become totally frustrated.  Since I get numerous letters & 
  109.      Email notes weekly, I can't promise that I'll be able to help 
  110.      you out when you've altered the provided source code.  You 
  111.      are best served if you purchase one or both of the above 
  112.      mentioned books for explanations of what is going on in the 
  113.      program.  Good luck & Happy GFA Basic'ing!
  114.      
  115.                               PD release
  116.  
  117.           This GFATIP file is in the public Domain.  However, the 
  118.      documentation file is Copyright (c)1987 by Marathon Computer 
  119.      Press, and is provided as a public service.  You may not 
  120.      include the text of this file in any publication, or 
  121.      newsletter without the approval of Marathon Computer Press.  
  122.      The source code and idea are free for grabs.  You may also 
  123.      post this file on any bulletin board as long as it is posted 
  124.      in it's entirety.  If you use the material presented here, 
  125.      please make mention of where you heard it first!  No charge 
  126.      (of any kind) may be assessed for providing this Tip to the 
  127.      public.  If it's not 100% Free, don't do it!  Nuff Said.
  128.  
  129.  
  130.